require(['config'],() =>{
    require(['url','template','header','footer'],(url,template) =>{
        class Datail {
            constructor () {
                this.renderList()
            }
            renderList () {
                const id = location.search.slice(4)
                console.log(url)
                $.get(`${url.xmyxUrl}/tab/${id}`,{start : 0},(resp) =>{
                    if(resp.code ===200){
                        const {cname} = resp.data.category
                        var {list} = resp.data.items
                        console.log(list)
                        list = list.filter(shop => shop.title)
                        $('#cname').html(template('nav-list',{cname}))
                        $('#main-one').html(template('tatail-list',{list}))
                    }
                    
                })
            }   
        }
        new Datail()
    })
})